package org.yawnage.base
{
	//import com.demonsters.debugger.MonsterDebugger;
	import org.yawnage.interfaces.base.IDebug;
	
	/**
	 *
	 * @author Berry Jordaan
	 */
	public class Debug implements IDebug
	{
		/**
		 * Suppress local variables, the Defualt is true
		 */
		private var _localTrace:Boolean = true;
		
		public function Debug()
		{
		}
		
		public function _trace(obj:*, scope:* = null, color:uint = 0x000000, level:String = "info"):void
		{
			scope = (scope != null) ? scope : this;
			if (!_localTrace)
			{
				return;
			}
			Debug.traceValue(obj, scope, color, level);
		}
		
		/**
		 * get weather local debug traces are suppresed.
		 */
		public function get localTrace():Boolean
		{
			return _localTrace;
		}
		
		/**
		 * Suppress local class traces. If True, no traces will be send to the logger.
		 */
		public function set localTrace(value:Boolean):void
		{
			_localTrace = value;
		}
		
		/**
		 *
		 * @param	obj
		 * @param	scope
		 * @param	color
		 * @param	level
		 */
		public static function traceValue(obj:*, scope:* = null, color:uint = 0x000000, level:String = "info"):void
		{
			trace(obj);
			//if (!MonsterDebugger.enabled)
			//{
			//	return;
			//}
			//MonsterDebugger.trace(scope , obj, null, level, color);
		}
	}

}